/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package dae.fxcreator.node;

/**
 * Describes a shader type that can be set as type for an input or output port.
 * @author Koen
 */
public class ShaderType {
    /**
     * The type name
     */
    private String type;
    /**
     * The order of the type
     */
    private int order;

    /**
     * Creates a new ShaderType object
     * @param type the type
     * @param order the order for the type, for sorting
     */
    public ShaderType(String type,int order){
        this.type = type;
        this.order = order;
    }

    /**
     * Returns the type of this ShaderType object.
     * @return the type.
     */
    public String getType(){
        return type;
    }

    /**
     * @return the order for the type.
     */
    public int getOrder(){
        return order;
    }

    @Override
    public boolean equals(Object obj) {
        if (obj == null) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }
        final ShaderType other = (ShaderType) obj;
        if ((this.type == null) ? (other.type != null) : !this.type.equals(other.type)) {
            return false;
        }
        return true;
    }

    @Override
    public int hashCode() {
        int hash = 3;
        hash = 67 * hash + (this.type != null ? this.type.hashCode() : 0);
        return hash;
    }

    /**
     * Returns the string representation for this type.
     * @return the String representation for this type.
     */
    public String toString(){
        return this.type;
    }

}
